// Place all the styles related to the books controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

#new-book {

  .header {
    color: green;
    margin: 30px 115px;
    font-size: 22px;
    line-height: 25px;
    font-weight: bold;
  }

}

#edit-book {
  .header {
    color: green;
    font-size: 22px;
    line-height: 25px;
    font-weight: bold;
    margin: 30px 115px;
  }

}

#book-form {
  fieldset.inputs {
    .error{
      .controls {
        display: inline;
        margin-left: 20px;
      }
    }
  }

  fieldset.form-actions {
    background: transparent;
    border: none;
  }

  textarea {
    resize: none;
    height: 80px;
  }
}

#show-book {
  .header {
    margin: 30px 50px 10px 50px;

    span {
      display: inline-block;
      vertical-align: center;
    }

    span.title {
      width: 300px;
      color: green;
      font-size: 22px;
      line-height: 25px;
      font-weight: bold;
    }

    span.link {
      width: 210px;
      font-size: 15px;
      text-align: right;
    }

    span.image{
      width: 160px;
      img {
        width: 160px;
        height: 160px;
      }
    }
  }
  table.book_info_table {
    margin: auto;
    width: 700px;
    text-align: left;
    font-size: 13px;
    table-layout: fixed;

    border: 3px solid black;

    th {
      width: 150px;
      border: 2px solid #CCC;
      padding: 5px;
    }

    td {
      border: 2px solid #CCC;
      padding: 5px;
      word-wrap: break-word;
    }
  }

  .rate_btn {
    margin: 10px;
  }

  .comments_list {
    .past_comments {
      margin: 10px 5px;
      background-color: #CCC;
      padding: 5px;

      ul {
        li.comment {
          padding: 10px;
          list-style: none;
          margin: 4px;
          text-align: left;

          .title {
            font-weight: bold;
            font-size: 13px;
          }

          .user, .created_at {
            display: inline-block;
            margin-left: 10px;
            font-style: italic;
          }

          .message {
            border-top: 1px solid black;
          }
        }

        li:nth-child(even) {
          background-color: #DDD;
          text-align: right;
        }
      }
    }

    .input_comment {
      .submit_btn {
        text-align: right;
      }
    }
  }
}

#index-book {
  .header {
    margin: 30px 115px;

    span.title {
      font-size: 22px;
      line-height: 25px;
      color: green;
      font-weight: bold;
    }

    span.create_btn {
      float: right;
      margin-top: -10px;
    }
  }

  table#books-list {
    width: 750px;
    text-align: left;
    font-size: 13px;
    border: 3px solid black;

    tr.heading {
      font-style: italic;
      border: 3px solid black;
      padding: 5px;
      text-align: center;

      th {
        border: 1px solid #CCC;
      }
    }

    td {
      border: 1px solid #CCC;
      padding: 5px 10px;

      &.cover {
        width: 50px;

        img {
          width: 50px;
          height: 50px;
        }
      }

      &.isbn {
        width: 100px;
      }

      &.name {
        width: 100px;
      }

      &.category {
        width: 100px;
      }

      &.description {
        width: 150px;
        min-width: 150px;
        max-width: 150px;
        word-wrap: break-word;
      }

      &.author {
        width: 100px;
      }

      &.action {
        width: 150px;
      }
    }
  }
}
